From: kfraser@localhost.localdomain Date: Wed, 29 Aug 2007 13:54:14 +0000 (+0100) Subject: x86: Do not #GP when guest writes unexpected values to CR4. Just X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14987^2~54 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=17af24e1892dc45e2cca26a9bed9d8a09d715c67;p=xen.git x86: Do not #GP when guest writes unexpected values to CR4. Just ignore them. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index f89e169108..459077a822 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1673,12 +1673,11 @@ static int emulate_privileged_op(struct cpu_user_regs *regs) goto fail; break; - case 4: + case 4: /* Write CR4 */ if ( *reg != (read_cr4() & ~(X86_CR4_PGE|X86_CR4_PSE)) ) - { - gdprintk(XENLOG_WARNING, "Attempt to change CR4 flags.\n"); - goto fail; - } + gdprintk(XENLOG_WARNING, + "Attempt to change CR4 flags %08lx -> %08lx\n", + read_cr4() & ~(X86_CR4_PGE|X86_CR4_PSE), *reg); break; default: